<?php
namespace app\http\middleware;

use think\Response;

class Check
{
    public function handle($request, \Closure $next)
    {
        $token = $request->param('token');
        if(!$token){
            return Response::create(['data' => '', 'code' => 1, 'msg' => '登录失效'],'json');
        }else{
            $request->token = $token;
            return $next($request);
        }
    }
}